.class public Les/dx;
.super Ljava/lang/Object;
.source "DlnaNotificationManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/dx$b;
    }
.end annotation


# static fields
.field private static d:Les/dx;


# instance fields
.field private a:Landroid/app/NotificationManager;

.field private b:Les/dx$b;

.field private c:I


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .line 1
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    return-void
.end method

.method private constructor <init>()V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, -0x1

    .line 2
    iput v0, p0, Les/dx;->c:I

    .line 3
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    const-string v1, "notification"

    invoke-virtual {v0, v1}, Landroid/app/Application;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Les/dx;->a:Landroid/app/NotificationManager;

    .line 4
    invoke-direct {p0}, Les/dx;->f()V

    return-void
.end method

.method static synthetic a(Les/dx;)I
    .locals 0

    .line 1
    iget p0, p0, Les/dx;->c:I

    return p0
.end method

.method private a(I)V
    .locals 1

    .line 32
    iget-object v0, p0, Les/dx;->a:Landroid/app/NotificationManager;

    if-eqz v0, :cond_0

    .line 33
    invoke-virtual {v0, p1}, Landroid/app/NotificationManager;->cancel(I)V

    .line 34
    iget v0, p0, Les/dx;->c:I

    if-ne v0, p1, :cond_0

    const/4 p1, -0x1

    .line 35
    iput p1, p0, Les/dx;->c:I

    :cond_0
    return-void
.end method

.method static synthetic a(Les/dx;I)V
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Les/dx;->a(I)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 5

    .line 3
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    const v1, 0x7f0c00f9

    .line 4
    iput v1, p0, Les/dx;->c:I

    .line 5
    new-instance v2, Landroid/widget/RemoteViews;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3, v1}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

    const v1, 0x7f090333

    .line 6
    invoke-virtual {v2, v1, p1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    const/4 p1, 0x0

    const v1, 0x7f09032e

    .line 7
    invoke-virtual {v2, v1, p1}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    const v1, 0x7f09032f

    const/16 v3, 0x8

    .line 8
    invoke-virtual {v2, v1, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    const v3, 0x7f110063

    .line 9
    invoke-virtual {v0, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    const v4, 0x7f090332

    .line 10
    invoke-virtual {v2, v4, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    const v3, 0x7f11097d

    .line 11
    invoke-virtual {v0, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v1, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    const v1, 0x7f090330

    const v3, 0x7f080594

    .line 12
    invoke-virtual {v2, v1, v3}, Landroid/widget/RemoteViews;->setImageViewResource(II)V

    .line 13
    iget v1, p0, Les/dx;->c:I

    invoke-virtual {p0, v0, v1}, Les/dx;->a(Landroid/content/Context;I)Landroid/app/PendingIntent;

    move-result-object v0

    .line 14
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    invoke-static {v1}, Les/dh0;->a(Landroid/app/Application;)Les/dh0;

    move-result-object v1

    const-string v3, "other_remind"

    .line 15
    invoke-virtual {v1, v3}, Les/dh0;->a(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v1

    const v3, 0x7f080723

    .line 16
    invoke-virtual {v1, v3}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v1

    .line 17
    invoke-virtual {v1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    .line 18
    invoke-virtual {v0, p1}, Landroidx/core/app/NotificationCompat$Builder;->setShowWhen(Z)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    .line 19
    invoke-virtual {v0, v2}, Landroidx/core/app/NotificationCompat$Builder;->setCustomContentView(Landroid/widget/RemoteViews;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    .line 20
    invoke-virtual {v0, p1}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object p1

    const/4 v0, 0x1

    .line 21
    invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setOngoing(Z)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object p1

    .line 22
    invoke-virtual {p1}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object p1

    .line 23
    iget-object v0, p0, Les/dx;->a:Landroid/app/NotificationManager;

    iget v1, p0, Les/dx;->c:I

    invoke-virtual {v0, v1, p1}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    return-void
.end method

.method static synthetic b(Les/dx;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/dx;->e()V

    return-void
.end method

.method public static d()Les/dx;
    .locals 2

    .line 1
    sget-object v0, Les/dx;->d:Les/dx;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Les/dx;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Les/dx;->d:Les/dx;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Les/dx;

    invoke-direct {v1}, Les/dx;-><init>()V

    sput-object v1, Les/dx;->d:Les/dx;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1

    .line 6
    :cond_1
    :goto_0
    sget-object v0, Les/dx;->d:Les/dx;

    return-object v0
.end method

.method private e()V
    .locals 3

    .line 1
    new-instance v0, Landroid/content/Intent;

    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    const-class v2, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/high16 v1, 0x14000000

    .line 2
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    const-string v1, "com.estrongs.android.pop.action.OPEN_DLNA_DEVICE_PAGE"

    .line 3
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 4
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/app/Application;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private f()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/dx;->b:Les/dx$b;

    if-nez v0, :cond_0

    .line 2
    new-instance v0, Les/dx$b;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Les/dx$b;-><init>(Les/dx;Les/dx$a;)V

    iput-object v0, p0, Les/dx;->b:Les/dx$b;

    .line 3
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "com.estrongs.android.pop.intent.DLNA_NOTIFY"

    .line 4
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    iget-object v2, p0, Les/dx;->b:Les/dx$b;

    invoke-virtual {v1, v2, v0}, Landroid/app/Application;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    :cond_0
    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;I)Landroid/app/PendingIntent;
    .locals 2

    .line 26
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "dlna_notification_id_key"

    .line 27
    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 28
    const-class p2, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-virtual {v0, p1, p2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    const/high16 p2, 0x14000000

    .line 29
    invoke-virtual {v0, p2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    const-string p2, "com.estrongs.android.pop.action.OPEN_DLNA_DEVICE_PAGE"

    .line 30
    invoke-virtual {v0, p2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const/4 p2, 0x0

    const/high16 v1, 0x8000000

    .line 31
    invoke-static {p1, p2, v0, v1}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method public a()V
    .locals 2

    .line 24
    iget v0, p0, Les/dx;->c:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    .line 25
    invoke-direct {p0, v0}, Les/dx;->a(I)V

    :cond_0
    return-void
.end method

.method public b()V
    .locals 4

    .line 2
    invoke-static {}, Lcom/estrongs/android/dlna/c;->g()Lcom/estrongs/android/dlna/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/dlna/c;->b()Les/l10;

    move-result-object v0

    if-nez v0, :cond_0

    return-void

    .line 3
    :cond_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v2

    const v3, 0x7f110452

    .line 4
    invoke-virtual {v2, v3}, Landroid/app/Application;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Les/l10;->b()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 5
    invoke-direct {p0, v0}, Les/dx;->a(Ljava/lang/String;)V

    return-void
.end method

.method public c()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    const v1, 0x7f110452

    invoke-virtual {v0, v1}, Landroid/app/Application;->getString(I)Ljava/lang/String;

    move-result-object v0

    const-string v1, "\u6295\u5c4f1"

    invoke-virtual {v0, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 2
    invoke-direct {p0, v0}, Les/dx;->a(Ljava/lang/String;)V

    return-void
.end method
